﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store Manager/SM_panel.master" AutoEventWireup="true" CodeFile="SM_SupplierGRN.aspx.cs" Inherits="Store_Manager_SM_SupplierGRN" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
    ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
    CssPostfix="BlackGlass" DataSourceID="SqlDataSource1" KeyFieldName="Sup_ID" 
    Width="100%">
    <Columns>
        <dx:GridViewCommandColumn VisibleIndex="0">
            <EditButton Visible="True">
            </EditButton>
            <ClearFilterButton Visible="True">
            </ClearFilterButton>
        </dx:GridViewCommandColumn>
        <dx:GridViewDataTextColumn Caption="Supplier ID" FieldName="Sup_ID" ReadOnly=true 
           VisibleIndex="0">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="Supplier Name" FieldName="Sup_Name"  ReadOnly=true
            VisibleIndex="1">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="GRN No:" FieldName="Or_ID" ReadOnly="True" 
            VisibleIndex="2">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="Bill No:" FieldName="Supplier_Bill_No" 
            VisibleIndex="3">
        </dx:GridViewDataTextColumn>
    </Columns>
        <SettingsPager PageSize="25">
        </SettingsPager>
        <Settings ShowFilterRow="True" />
    <Images SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
        <LoadingPanelOnStatusBar Url="~/App_Themes/BlackGlass/GridView/gvLoadingOnStatusBar.gif">
        </LoadingPanelOnStatusBar>
        <LoadingPanel Url="~/App_Themes/BlackGlass/GridView/Loading.gif">
        </LoadingPanel>
    </Images>
    <ImagesFilterControl>
        <LoadingPanel Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
        </LoadingPanel>
    </ImagesFilterControl>
    <Styles CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
        CssPostfix="BlackGlass">
        <Header ImageSpacing="5px" SortingImageSpacing="5px">
        </Header>
    </Styles>
    <StylesEditors>
        <CalendarHeader Spacing="1px">
        </CalendarHeader>
        <ProgressBar Height="25px">
        </ProgressBar>
    </StylesEditors>
</dx:ASPxGridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
    DeleteCommand="DELETE FROM [Tbl_SupplierOrder] WHERE [Sup_ID] = @Sup_ID AND [Or_ID] = @Or_ID" 
    InsertCommand="INSERT INTO [Tbl_SupplierOrder] ([Sup_ID], [Sup_Name], [Or_ID], [Supplier_Bill_No]) VALUES (@Sup_ID, @Sup_Name, @Or_ID, @Supplier_Bill_No)" 
    SelectCommand="SELECT [Sup_ID], [Sup_Name], [Or_ID], [Supplier_Bill_No] FROM [Tbl_SupplierOrder]" 
    UpdateCommand="UPDATE [Tbl_SupplierOrder] SET [Sup_Name] = @Sup_Name, [Supplier_Bill_No] = @Supplier_Bill_No WHERE [Sup_ID] = @Sup_ID AND [Or_ID] = @Or_ID">
    <DeleteParameters>
        <asp:Parameter Name="Sup_ID" Type="String" />
        <asp:Parameter Name="Or_ID" Type="String" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="Sup_ID" Type="String" />
        <asp:Parameter Name="Sup_Name" Type="String" />
        <asp:Parameter Name="Or_ID" Type="String" />
        <asp:Parameter Name="Supplier_Bill_No" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="Sup_Name" Type="String" />
        <asp:Parameter Name="Supplier_Bill_No" Type="String" />
        <asp:Parameter Name="Sup_ID" Type="String" />
        <asp:Parameter Name="Or_ID" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>
</asp:Content>

